package com.itheima.create;

/**
 * @author Anomaly
 * @date 2023/2/10 13:58
 */
public class ThreadDemo {
    public static void main(String[] args) {
        Thread myThread = new MyThread();
        myThread.start();
        for (int i = 0; i < 10000; i++) {
            System.out.println("主线程执行输出：" + i);
        }
    }
}

class MyThread extends Thread {

    @Override
    public void run() {
        for (int i = 0; i < 10000; i++) {
            System.err.println("子线程执行输出：" + i);
        }
    }
}